home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
comm
/
misc
/
thor10.lha
/
Thor
/
InstallThor
< prev
next >
Wrap
Text File
|
1993-11-01
|
13KB
|
569 lines
;*************************************************************************
; Title:
; Install-Thor
;*************************************************************************
; Description:
; Commodore Installer Script for the Thor software
;*************************************************************************
; Author:
; Øyvind Ellefsen
;*************************************************************************
; Still to do:
;
;*************************************************************************
; History:
; 4/8-93 - First tries. Ver 00
; 4/8-93 - Working version. Copying files&stuff.
; 5/8-93 - Asking for install from disk Ver. 02
; 7/8-93 - What's up? New beta.. Shit! Ver. 03
; 5/9-93 - Ok. Final effort.. Ver. 06
; 21/9-93 - Changes Changes... ARRGGHH!! Ver. 07
; 23/9-93 - Removed beta-strings. Polished help-texts. Release Ver.
; 7/10-93 - Added Reqtools.library install.
; 10/10-93 - Convert, ChoiceType, User-startup, CheckForThor
; 12/10-93 - Assign-handling
; 13/10-93 - Custom ReqTools.library install
; 14/10-93 - Device/Volume check
; 1/11-93 - Added some CfgArchivers shit
;*************************************************************************
;
;******************************************************
;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
;******************************************************
; some useful variables
(set true 1)
(set false 0)
(set yes true)
(set no false)
(set is_a_file 1)
(set is_a_dir 2)
(set quote "\"")
(set newline "\n")
(set nothing "")
(set Convert No)
; set up our delete options
(delopts "AskUser" "OkNoDelete" "Force")
; some useful procedures
; change userlevel to expert
(procedure expert_level
(
(user 2)
)
)
; reset userlevel back to default
(procedure default_level
(
(user default-level)
)
)
; store off userlevel
(procedure save_default_level
(
(set default-level @user-level)
)
)
; some overused strings
(set omp (cat "One moment please..." newline))
; introduce ourselfs to the viewers
(welcome "Welcome to the Thor installer. This installer uses "
"the Commodore Amiga Installer. All of our future Thor releases "
"will be using this installer and we would like to get any feedback "
"that might help in improving the installation procedure." newline
)
; first reset the user level so that the novice can see whats going on
(save_default_level)
(expert_level)
;Make assign to install from
(makeassign "Thor_Install" "" (safe))
; Get Assigns and partitions
(set BBSdata_Dir (getassign "BBSData"))
(set BBSData_Device (getassign "BBSData" "d"))
(set BBSData_Volume (getassign "BBSData" "v"))
(set Thor_Dir (getassign "Thor"))
(set Thor_Device (getassign "Thor" "d"))
(set Thor_Volume (getassign "Thor" "v"))
(set BBSDataUpdate No)
(set BBSDataIsVolume No)
(set BBSDataIsDevice No)
(set BBSDataHard No)
(set ThorUpdate No)
(set ThorIsDevice No)
(set ThorIsVolume No)
(set ThorHard No)
(if (<> Thor_Dir nothing)
(set ThorUpdate Yes)
(set Thor_Dir "Work")
)
(if (<> Thor_Device nothing)
(
(set ThorUpdate Yes)
(set ThorIsDevice Yes)
(set Thor_Dir Thor_Device)
(set ThorHard Yes)
)
)
(if (<> Thor_Volume nothing)
(
(set ThorUpdate Yes)
(set ThorIsVolume Yes)
(set Thor_Dir Thor_Volume)
(set ThorHard Yes)
)
)
(if (<> BBSData_Dir nothing)
(set BBSDataUpdate Yes)
)
(if (<> BBSData_Device nothing)
(
(set BBSDataUpdate Yes)
(set BBSDataIsDevice Yes)
(set BBSData_Dir BBSData_Device)
(set BBSDataHard Yes)
)
)
(if (<> BBSData_Volume nothing)
(
(set BBSDataUpdate Yes)
(set BBSDataIsVolume Yes)
(set BBSData_Dir BBSData_Volume)
(set BBSDataHard Yes)
)
)
;******************
;** Check Memory **
;******************
(set Running (run "Thor_Install:CheckForThor"))
(debug "Running= "running)
(while (= Running 20)
((Message newline "Thor seem to be running, you MUST close it NOW."
newline "If you don't, the installation will fail!")
(set Running (run "Thor_Install:thor/bin/CheckForThor")))
)
;************************
;** Start Installation **
;************************
(run "Avail flush")
(if (= ThorUpdate Yes)
;then
(if (askbool
(prompt "Thor seems to be installed on your system already." newline
"The program resides in " quote Thor_Dir quote "." newline
"Do you want to install Thor over it?")
(help
"The installer has determined that you may already have a "
"copy of Thor installed on your system. If this is wrong or "
"you want the update installed elsewhere, select NO as an "
"answer. Otherwise, select YES."
)
(default 1)
)
; Then
(
(set is_update Yes)
)
; Else
(
(set is_update No)
(set Thor_Dir
(askdir
(prompt "Where would you like Thor installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default "Work:")
(newpath)
)
)
(set user_script (cat user_script (cat "Assign Thor: " quote Thor_dir quote newline)))
)
)
;Else
((set Thor_Dir
(askdir
(prompt "Where would you like Thor installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default @default-dest)
(newpath)
)
)
(set user_script (cat "Assign Thor: " quote Thor_dir quote newline))
)
)
; before we go on lets reset the user's level back to what it was
(default_level)
; verify that the Thor directory exists
(if (<> (exists Thor_Dir) is_a_dir)
(
(makedir Thor_Dir
(prompt
"The directory you have selected for Thor does not "
"seem to exist. Do you want us to create it for you?"
)
(help @makedir-help)
(infos)
(confirm)
)
(set user_script (cat "Assign Thor: " quote Thor_dir quote newline))
)
)
(makeassign "Thor" Thor_dir)
(makedir "Thor:Data")
;*************
;** BBSData **
;*************
(debug "BBSDataDir=" BBSDataDir)
(default_level)
;(if(= @user-level 2)
; Then
(if (= BBSDataUpdate Yes)
; Then
(if (askbool
(prompt "There seems to be a message database installed on your system already."
"The database resides in " quote BBSData_Dir quote "." newline
"Do you want to use this database further?"
)
(help
"The installer has determined that you may already have a "
"message database installed on your system. If this is wrong or "
"you want the database installed elsewhere, select NO as an "
"answer. Otherwise, select YES."
)
(default 1)
)
; Then
(
(set RunCfgArchivers No)
)
; Else
(
(set RunCfgArchivers Yes)
(set BBSDataMove Yes)
(set is_update No)
(set BBSData_Dir
(askdir
(prompt "Where would you like the message database installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default "Thor:Data")
(newpath)
)
)
(set user_script (cat user_script (cat "Assign BBSData: " quote BBSData_dir quote newline)))
)
)
; Else
(
(set RunCfgArchivers Yes)
(set BBSData_Dir (cat Thor_Dir "/Data"))
(set user_script (cat user_script (cat "Assign BBSData: " quote BBSData_dir quote newline)))
)
)
; Else
;
; (
; (set BBSData_Dir (cat Thor_Dir "/Data"))
; (set user_script (cat user_script (cat "Assign BBSData: " quote BBSData_dir quote newline)))
; (debug "BBSData_Dir if Intermediate=" BBSData_Dir)
; )
;)
;***********************************
;***** GET FIRST DISK IN HERE ******
;***********************************
; first copy over the stuff
(working omp "Scanning Thor Program disk for files.")
(copyfiles
(prompt "Copying files needed by Thor")
(help "This will copy the program and support files needed by Thor."
newline
@copyfiles-help
)
(source "Thor_Install:thor")
(dest Thor_dir)
(optional nofail force askuser)
(all)
(infos)
)
;******************
;** User-Startup **
;******************
(debug "Startup = " user_script)
(save_default_level)
(expert_level)
(if (= is_update Yes)
;Then
(set is_update Yes)
;else
(if (= BBSDataMove Yes)
;Then
(
; now figure out the addition to the user-startup
(Debug "User_Script=" user_script)
; modify S:User-Startup
(working omp "Updating S:User-Startup.")
(startup "Thor"
(prompt
"These instructions need to be added to the \"S:User-Startup\" "
"so that your system will be properly configured to use Thor "
newline
newline
user_script
)
(help @startup-help)
(command user_script)
)
)
;Else
(
; now figure out the addition to the user-startup
; modify S:User-Startup
(Debug "User_Script=" user_script)
(working omp "Updating S:User-Startup.")
(startup "Thor"
(prompt
"These instructions need to be added to the \"S:User-Startup\" "
"so that your system will be properly configured to use Thor "
newline
newline
user_script)
(help @startup-help)
(command user_script)
)
)
)
)
;*********************
;** reqtools.libary **
;*********************
(default_level)
(debug "ReqTools" @user-level)
(if(= @user-level 2)
;then
(copylib
(prompt "Copying ReqTools library")
(help "This will copy the ReqTools library." newline @copylib-help)
(source "Thor_Install:ReqTools.library")
(dest "libs:")
(confirm)
)
;else
(copylib
(prompt "Copying ReqTools library")
(help "This will copy the ReqTools library." newline @copylib-help)
(source "Thor_Install:ReqTools.library")
(dest "libs:")
)
)
;************
;** CfgBBS **
;************
(default_level)
(debug "CfgBBS" @user-level)
(set name
(askoptions
(prompt "Choose the BBS Types to install:")
(help "Choose the BBS Types you are going to use with Thor" newline newline @askchoice-help)
(choices "QWK - General QWK" "ABBS - Plain ABBS" "MBBS - Plain MBBS" "ABBS_QWK - ABBS with QWK support" "MBBS_QWK - MBBS with QWK support" "MBBS_SP_QWK - Crusaders-type MBBS_QWK")
(default 63)
)
)
(debug BBSData_dir)
(makeassign "BBSData" BBSData_dir)
(if (= RunCfgArchivers Yes)
(
(execute "thor:s/CfgArchivers")
(debug "Runnin' CfgShitArchivers")
)
)
(Debug "Name="name)
(if (bitand 1 name)
(execute "thor:s/CfgQwk")
(Debug "1")
)
(if (bitand 2 name)
(execute "thor:s/CfgAbbs")
(Debug "2")
)
(if (bitand 4 name)
(execute "thor:s/CfgMbbs")
(Debug "4")
)
(if (bitand 8 name)
(execute "thor:s/CfgAbbs_qwk")
(Debug "8")
)
(if (bitand 16 name)
(execute "thor:s/CfgMbbs_qwk")
(Debug "16")
)
(if (bitand 32 name)
(execute "thor:s/CfgMbbs_sp_qwk")
(Debug "32")
)
;*************
;** Convert **
;*************
(debug "Convert="Convert)
(run "Avail flush")
(if (= Convert Yes)
;Then
(
(default_level)
(debug "Convert" @user-level)
(if(= @user-level 2)
;then
(
(message newline "The installer will now convert and upgrade the "
newline "message database and configuration for you.")
(run "Thor_install:thor/bin/convert convert")
(Debug "Running Convert")
)
;else
(
(working omp)
(run "Thor:Install:thor/bin/convert convert")
(Debug "Running Convert")
)
)
)
;Else
(Set Convert No)
)
;***********
;** Fonts **
;***********
(copyfiles
(prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
(help "This will copy the default font files for Thor." newline @copyfiles-help)
(source "Thor_Install:Fonts")
(dest "Fonts:")
(fonts)
(choices "Grn" "Thin609" "Thin611" "Thin711")
(confirm)
)
;***************
;** LogReader **
;***************
(if (askbool
(prompt newline "Do you want the LogReader software installed?")
(help newline "The LogReader software is a program for" newline
"calculating phone-bills from logfiles." newline
newline "Select YES if you want it installed, otherwise NO")
(default 1)
)
; Then
(copyfiles
(prompt "Copying LogReader files")
(help "This will copy the files needed by LogReader." newline @copyfiles-help)
(source "Thor_Install:LogReader")
(dest Thor_dir)
(all)
(infos)
)
)
;****************
;** AmigaGuide **
;****************
(if (askbool
(prompt newline "Do you want the AmigaGuide" newline "program and library installed?"
newline newline "If you have a newer version of the library" newline
"on your system, it will NOT be overwritten")
(help newline "The AmigaGuide library is needed for the Thor documentation."
newline newline "Select YES if you want it installed, otherwise NO")
(default 1)
)
; Then
(
(copyfiles
(prompt "Copying AmigaGuide program file")
(help "This will copy the files needed by AmigaGuide." newline @copyfiles-help)
(source "Thor_Install:AmigaGuide")
(dest "sys:Utilities")
)
(copylib
(prompt "Copying AmigaGuide library")
(help "This will copy the AmigaGuide library." newline @copylib-help)
(source "Thor_Install:AmigaGuide.library")
(dest "libs:")
)
)
)
;*****************************
;***** WE ARE ALMOST DONE ****
;*****************************
; make sure that default-dir is pointing to the right place
(set @default-dest Thor_Dir)
(makeassign "Thor_Install")
(makeassign "Thor_Disk" (safe))
; final message for our viewers
(set end_text (cat("Reboot your system now!" newline)))
; now for the exit
(exit end_text)